package com.yopuo.web.controller;

import com.yopuo.api.order.DemoService;
import org.apache.dubbo.config.annotation.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/port/demo")
public class DemoController {
    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Reference(check = false, version = "${reference.service.version}")
    private DemoService demoService;

    @GetMapping("/service1")
    private String service1() {
        return demoService.service1();
    }

    /*@Bean
    public ApplicationRunner runner() {
        return args -> logger.info(demoService.sayHello("mercyblitz"));
    }*/
}
